<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class UpdatePrizeTable extends Migration
{
	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		if (Schema::hasTable('prizes')) {
			Schema::table('prizes', function (Blueprint $table) {
				$table->float('stock_number')->change();
			});
		}
		if (Schema::hasTable('prize_records')) {
			Schema::table('prize_records', function (Blueprint $table) {
				$table->float('number')->change();
				$table->float('summary')->change();
			});
		}
		if (Schema::hasTable('prize_payments')) {
			Schema::table('prize_payments', function (Blueprint $table) {
				$table->float('price')->change();
			});
		}
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		//
	}
}
